import type { RouteRecordRaw } from 'vue-router';
 export const staticRoutes: Array<RouteRecordRaw> = [
	{
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      hidden: true
    }
  },

  {
    path: '/404',
    name: '404',
    component: () => import('@/views/error/404.vue'),
    meta: {
      hidden: true
    }
  },

  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    redirect: '/home',
    children: [
      {
        path: 'home',
        name: 'Home',
        component: () => import('@/views/home/index.vue'), 
        meta: { 
          title: '首页', 
          icon: 'ele-HomeFilled', 
        }
      }
    ]
  },
];


export const allAsyncRoutes: Array<RouteRecordRaw> = [
  {
    path: '/product',
    name: 'Product', 
    component: () => import('@/layout/index.vue'), 
    meta: {
      title: '商品管理',
      icon: 'ele-GoodsFilled', 
    },
    children: [
      {
        path: 'trademark/list',
        name: 'Trademark',
        component: () => import('@/views/product/trademark/index.vue'), 
        meta: {
          title: '品牌管理'
        }
      },
      {
        path: 'attr/list',
        name: 'Attr',
        component: () => import('@/views/product/attr/index.vue'),
        meta: {
          title: '平台属性管理'
        }
      },
      {
        path: 'spu/list',
        name: 'Spu',
        component: () => import('@/views/product/spu/index.vue'),
        meta: {
          title: 'SPU管理'
        }
      },
      {
        path: 'sku/list',
        name: 'Sku',
        component: () => import('@/views/product/sku/index.vue'),
        meta: {
          title: 'SKU管理'
        }
      },
    ]
  },
];

export const anyRoute = { 
  path: '/:pathMatch(.*)', 
  name: 'Any',
  redirect: '/404', 
  meta: {
    hidden: true 
  }
}
